package com.useeinfo.oa.modules.wuHanCommon.base.entity;

import com.useeinfo.framework.extend.entity.SuperClassEntity;
import com.useeinfo.oa.modules.base.entity.Organization;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 报警数据
 */
@Entity
@Table(name = "wuhan_warning")
public class Warning extends SuperClassEntity<Warning> {

    /**
     * 报警状态
     */
    private Integer warningStatus;
    /**
     * 报警详细描述
     */
    private String content;
    /**
     * 所属部门
     */
    @ManyToOne
    @JoinColumn(name = "organization_id")
    private Organization organization;
    /**
     * 所属系统字符串
     */
    private String system;
    /**
     * 等级
     */
    private String level;
    /**
     * 报警开始时间
     */
    private Date startTime;
    /**
     * 报警持续多少秒
     */
    private Long lastSeconds;
    /**
     * 报警事件的ID（对方系统的，不能重复）
     */
    private String otherWarningId;
    /**
     * 报警发生的区域位置地理信息
     */
    private String position;
    /**
     * 报警组
     */
    @ManyToOne
    @JoinColumn(name = "warning_group_id")
    private WarningGroup warningGroup;
    /**
     * 当前值
     */
    private String bindPointValue;
    /**
     * 阈值
     */
    private String infoDetail;

    @Transient
    private List<WarningDetail> warningDetails = new ArrayList<>();

    public Integer getWarningStatus() {
        return warningStatus;
    }

    public void setWarningStatus(Integer warningStatus) {
        this.warningStatus = warningStatus;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Organization getOrganization() {
        return organization;
    }

    public void setOrganization(Organization organization) {
        this.organization = organization;
    }

    public String getSystem() {
        return system;
    }

    public void setSystem(String system) {
        this.system = system;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public List<WarningDetail> getWarningDetails() {
        return warningDetails;
    }

    public void setWarningDetails(List<WarningDetail> warningDetails) {
        this.warningDetails = warningDetails;
    }

    public Long getLastSeconds() {
        return lastSeconds;
    }

    public void setLastSeconds(Long lastSeconds) {
        this.lastSeconds = lastSeconds;
    }

    public String getOtherWarningId() {
        return otherWarningId;
    }

    public void setOtherWarningId(String otherWarningId) {
        this.otherWarningId = otherWarningId;
    }

    public WarningGroup getWarningGroup() {
        return warningGroup;
    }

    public void setWarningGroup(WarningGroup warningGroup) {
        this.warningGroup = warningGroup;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getBindPointValue() {
        return bindPointValue;
    }

    public void setBindPointValue(String bindPointValue) {
        this.bindPointValue = bindPointValue;
    }

    public String getInfoDetail() {
        return infoDetail;
    }

    public void setInfoDetail(String infoDetail) {
        this.infoDetail = infoDetail;
    }
}
